<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
  <title>css鼠标悬停效果，链接悬停样式素材</title>
  <style>
    @import url(https://fonts.googleapis.com/css?family=Oswald);
    body {
    /*background: #1e7a90;*/
    /*background: #0078a4;*/
    background: #00c17f;
    color: #fff;
    font-family: "Oswald", Arial, sans-serif;
    text-align: center;
    }

    h1 {
    width: 100%;
    text-align: center;
    letter-spacing: 0.02em;
    margin: 2em 0;
    }

    .links {
    width: 90%;
    margin: 0 auto;
    }

    .link {
    display: inline-block;
    vertical-align: top;
    width: 100px;
    height: 34px;
    line-height: 36px;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    letter-spacing: 0.1em;
    text-align: center;
    font-size: 0.8rem;
    margin: 10px;
    position: relative;
    }

    .link span {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    text-align: center;
    }

    .wipe, .opacity {
    border: 2px solid #fff;
    border-radius: 4px;
    overflow: hidden;
    }

    .opacity {
    -webkit-transition: background-color 0.3s linear, color 0.3s linear;
    transition: background-color 0.3s linear, color 0.3s linear;
    background: rgba(255, 255, 255, 0);
    }

    .opacity:hover {
    color: #124a58;
    background: rgba(255, 255, 255, 0.9);
    }

    .wipe {
    -webkit-transition: color 0.3s ease-out;
    transition: color 0.3s ease-out;
    }

    .wipe::after {
    width: 100%;
    height: 100%;
    display: block;
    background-color: #fff;
    content: " ";
    position: absolute;
    top: 0;
    -webkit-transition: -webkit-transform 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
    transition: -webkit-transform 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
    transition: transform 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
    transition: transform 0.2s cubic-bezier(0.215, 0.61, 0.355, 1), 
    -webkit-transform 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
    -webkit-transform: translateY(34px);
    transform: translateY(34px);
    z-index: -1;
    }

    .wipe:hover {
    color: #124a58;
    }

    .wipe:hover::after {
    -webkit-transform: translateY(0px);
    transform: translateY(0px);
    }

    .underline {
    border: 2px solid transparent;
    }

    .underline::after {
    width: 0%;
    height: 2px;
    display: block;
    background-color: #fff;
    content: " ";
    position: absolute;
    top: 34px;
    left: 50%;
    -webkit-transition: left 0.2s cubic-bezier(0.215, 0.61, 0.355, 1), 
    width 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
    transition: left 0.2s cubic-bezier(0.215, 0.61, 0.355, 1), 
    width 0.2s cubic-bezier(0.215, 0.61, 0.355, 1);
    }

    .underline:hover::after {
    width: 100%;
    height: 2px;
    display: block;
    background-color: #fff;
    content: " ";
    position: absolute;
    top: 34px;
    left: 0;
    }
</style>
</head>
<body>
    <!-- html布局 -->
    <h1>几个链接特效</h1>
    <section class="links">
        <a class="link wipe" href="#">PHP学习</a>
        <a class="link underline" href="#">Go语言学习</a>
        <a class="link opacity" href="#">Vue学习</a>
    </section>
</body>
</html>
